/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : main.cc
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2021-12-17 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "elevator.h"

#define MAIN_LOGI(fmt, args...) printf("%d Main I: " fmt, __LINE__, ##args)
#define MAIN_LOGD(fmt, args...) printf("%d Main D: " fmt, __LINE__, ##args)
#define MAIN_LOGW(fmt, args...) printf("%d Main W: " fmt, __LINE__, ##args)
#define MAIN_LOGE(fmt, args...) printf("%d Main E: " fmt, __LINE__, ##args)

int main(int argc, char *argv[])
{
    CElevatorSrv::GetInstance()->Init();
    CElevator *theElevator = CElevator::GetInstance();

    sleep(2);
    theElevator->TakeUpOrder(2);
    theElevator->ArriveFloor(4);

    theElevator->TakeUpOrder(3);
    theElevator->ArriveFloor(5);

    theElevator->TakeDownOrder(2);
    theElevator->ArriveFloor(1);


    while(1);
    return 0;
}
